<template>
  <el-submenu v-if="item.children" :index="item.path" :popper-append-to-body="false">
    <template slot="title">
      <i v-if="item.ico" :class="item.ico" />
      <span slot="title">{{ item.name }}</span>
    </template>
    <submenu-l-item v-for="(items, index) in item.children" :key="index" :item="items" />
  </el-submenu>
  <el-menu-item v-else :index="item.path">
    <i v-if="item.ico" :class="item.ico" />
    <span slot="title">{{ item.name }}</span>
  </el-menu-item>
</template>

<script>
export default {
  name: 'SubmenuLItem',
  props: {
    item: {
      type: Object,
      default: () => ({})
    }
  }
}
</script>

<style scoped>
    .el-menu-vertical-demo:not(.el-menu--collapse) {
        min-height: 400px;
    }
</style>
